545fe5207ecc8c4d4dd4da556896a169dc6cb2ff,sources/net.sf.j2s.ajax/ajaxrpc/net/sf/j2s/ajax/SimpleSerializable.java,SimpleSerializable,serializeBytes,#SimpleFilter#List#boolean#,922

Before Change


					String value = String.valueOf(n);
					dos.writeByte(baseChar + value.length());
					dos.writeBytes(value);
				} else if (isSubclassOf(type, SimpleSerializable.class)) {
					SimpleSerializable ssObj = (SimpleSerializable) field.get(this);
					if (ssObj == null && ignoring) continue;
					dos.writeByte(baseChar + name.length());
					dos.writeBytes(name);
					serializeBytesObject(dos, ssObj, ssObjs, supportsCompactBytes);
				} else if (type == long.class) {
					long l = field.getLong(this);
					if (l == 0L && ignoring) continue;
					dos.writeByte(baseChar + name.length());
					dos.writeBytes(name);
					dos.writeByte('L');
					String value = String.valueOf(l);
					dos.writeByte(baseChar + value.length());
					dos.writeBytes(value);
				} else if (type == boolean.class) {
					boolean b = field.getBoolean(this);
					if (b == false && ignoring) continue;
					dos.writeByte(baseChar + name.length());
					dos.writeBytes(name);
					dos.writeByte('b');
					dos.writeByte('C'); // ((char) (baseChar + 1));
					dos.writeByte(b ? '1' : '0');
				} else if (type.isArray()) { // Array ...
					if (type == byte[].class) {
						byte [] bs = (byte []) field.get(this);
						if (bs == null && ignoring) continue;
						dos.writeByte(baseChar + name.length());
						dos.writeBytes(name);
						dos.writeBytes(!bytesCompactMode() || !supportsCompactBytes ? "AB" : "A8");
						if (bs == null) {
							dos.writeByte('A'); // (char) (baseChar - 1));
						} else {
							serializeBytesLength(dos, bs.length);
							if (!bytesCompactMode() || !supportsCompactBytes) {
								for (int j = 0; j < bs.length; j++) {
									String value = String.valueOf(bs[j]);
									dos.writeByte(baseChar + value.length());
									dos.writeBytes(value);
								}
							} else {
								dos.write(bs);
							}
						}
					} else if (type == String[].class) {
						String[] ss = (String []) field.get(this);
						if (ss == null && ignoring) continue;
						dos.writeByte(baseChar + name.length());
						dos.writeBytes(name);
						dos.writeBytes("AX"); // special
						if (ss == null) {
							dos.writeByte('A'); // (char) (baseChar - 1));
						} else {
							serializeBytesLength(dos, ss.length);
							for (int j = 0; j < ss.length; j++) {
								String s = ss[j];
								serializeBytesString(dos, s);
							}
						}
					} else if (isSubclassOf(type, SimpleSerializable[].class)) {
						SimpleSerializable[] ss = (SimpleSerializable []) field.get(this);
						if (ss == null && ignoring) continue;
						dos.writeByte(baseChar + name.length());

After Change


					String value = String.valueOf(n);
					dos.writeByte(baseChar + value.length());
					dos.writeBytes(value);
				} else if (isSubclassOf(type, SimpleSerializable.class) || type == SimpleSerializable.class) {
					SimpleSerializable ssObj = (SimpleSerializable) field.get(this);
					if (ssObj == null && ignoring) continue;
					dos.writeByte(baseChar + name.length());
					dos.writeBytes(name);
					serializeBytesObject(dos, ssObj, ssObjs, supportsCompactBytes);
				} else if (type == long.class) {
					long l = field.getLong(this);
					if (l == 0L && ignoring) continue;
					dos.writeByte(baseChar + name.length());
					dos.writeBytes(name);
					dos.writeByte('L');
					String value = String.valueOf(l);
					dos.writeByte(baseChar + value.length());
					dos.writeBytes(value);
				} else if (type == boolean.class) {
					boolean b = field.getBoolean(this);
					if (b == false && ignoring) continue;
					dos.writeByte(baseChar + name.length());
					dos.writeBytes(name);
					dos.writeByte('b');
					dos.writeByte('C'); // ((char) (baseChar + 1));
					dos.writeByte(b ? '1' : '0');
				} else if (type.isArray()) { // Array ...
					if (type == byte[].class) {
						byte [] bs = (byte []) field.get(this);
						if (bs == null && ignoring) continue;
						dos.writeByte(baseChar + name.length());
						dos.writeBytes(name);
						dos.writeBytes(!bytesCompactMode() || !supportsCompactBytes ? "AB" : "A8");
						if (bs == null) {
							dos.writeByte('A'); // (char) (baseChar - 1));
						} else {
							serializeBytesLength(dos, bs.length);
							if (!bytesCompactMode() || !supportsCompactBytes) {
								for (int j = 0; j < bs.length; j++) {
									String value = String.valueOf(bs[j]);
									dos.writeByte(baseChar + value.length());
									dos.writeBytes(value);
								}
							} else {
								dos.write(bs);
							}
						}
					} else if (type == String[].class) {
						String[] ss = (String []) field.get(this);
						if (ss == null && ignoring) continue;
						dos.writeByte(baseChar + name.length());
						dos.writeBytes(name);
						dos.writeBytes("AX"); // special
						if (ss == null) {
							dos.writeByte('A'); // (char) (baseChar - 1));
						} else {
							serializeBytesLength(dos, ss.length);
							for (int j = 0; j < ss.length; j++) {
								String s = ss[j];
								serializeBytesString(dos, s);
							}
						}
					} else if (isSubclassOf(type, SimpleSerializable[].class) || type == SimpleSerializable[].class) {
						SimpleSerializable[] ss = (SimpleSerializable []) field.get(this);
						if (ss == null && ignoring) continue;
						dos.writeByte(baseChar + name.length());